interface Person {
    name: string;
    agent: number;
}

type Person21 = Readonly<Person>;
type Person31 = Partial<Person>


class Test1 {
    run() {
        let person: Person = {
            name: 'dd',
            agent: 1
        };

        person.name = 'cc';

        let person2: Person2 = {
            name: 'read',
            agent: 1
        }
        //persion2.agent = 3; 报错

        let person3: Person3 = {
            name: 'person 3'//属性不完整也不会报错
        }
    }
}
